package com.gxa.service.impl;
import com.github.pagehelper.PageHelper;
import com.gxa.pojo.Institutional;
import com.gxa.dao.InstitutionalMapper;
import com.gxa.service.InstitutionalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InstitutionalServiceImpl implements InstitutionalService{
    @Autowired
    private InstitutionalMapper institutionalMapper;


    @Override
    public List<Institutional> selectInstitutional(int pageNum,int pageSize) {
        PageHelper.startPage(pageNum,pageSize);

        List<Institutional> institutional = institutionalMapper.selectInstitution();

        return institutional;
    }



    @Override
    public List<Institutional> query(Institutional institutional) {
        return null;
    }

    @Override
    public List<Institutional> queryByPage(Institutional institutional, int page, int size) {
        return null;
    }

    @Override
    public boolean deleteInstitutional(String institutional_name) {
        return institutionalMapper.deleteInstitutional(institutional_name)>0;
    }

    @Override
    public boolean insertInstitutional(Institutional institutional) {

        return institutionalMapper.insertInstitutional(institutional)>0;
    }

    @Override
    public int getCount() {
        return 0;
    }
}
